<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<script type="text/javascript">
function countFundAutoOfPerson(idStart, countStr, totalStr) {
	var indexs = countStr.split(",");
	var count = 0;
	for ( var i = 0; i < indexs.length; i++) {
		var fund = $("#" + idStart + indexs[i]).val();
		if (!$.isNumeric(fund))
			fund = "0";
		count = (parseFloat(count) * 10000 + parseFloat(fund) * 10000) / 10000;
	}
	
	var totalStrArr = totalStr.split(",");
	var totalId;
	for ( var i = 0; i < totalStrArr.length; i++) {
		totalId = totalStrArr[i];
		$("#" + idStart + totalId).val(count);
	}
	
}
$(function(){
	var completedsum = 0;
	if($("#completed_project_country").val()=='')
		completedsum =parseInt($("#completed_project_province").val());
	if($("#completed_project_province").val()=='')
		completedsum= parseInt($("#completed_project_country").val());
	if($("#completed_project_country").val()==''&&$("#completed_project_province").val()=='')
		completedsum = 0;
	else if($("#completed_project_country").val()!=''&&$("#completed_project_province").val()!='')
	 completedsum = parseInt($("#completed_project_country").val())+parseInt($("#completed_project_province").val());
	$("#num").val(completedsum);
	if($("#num").val()>0){
		$("#color1").show();
		$("#completedproject").find("input:text").addClass("required");
	}else{
		$("#color1").hide();
		$("#completedproject").find("input:text").removeClass("required");
	}
	var currentsum = 0;
	if($("#current_research_project_country").val()=='')
		currentsum =parseInt($("#current_research_project_province").val());
	if($("#current_research_project_province").val()=='')
		currentsum = parseInt($("#current_research_project_country").val());
	if($("#current_research_project_province").val()==''&&$("#current_research_project_country").val()=='')
		currentsum = 0
		else if($("#current_research_project_province").val()!=''&&$("#current_research_project_country").val()!='')
			currentsum = parseInt($("#current_research_project_province").val())+parseInt($("#current_research_project_country").val());
	$("#number").val(currentsum);
	if($("#number").val()>0){
		$("#color2").show();
		$("#currentresearch").find("input:text").addClass("required");
	}else{
		$("#color2").hide();
		$("#currentresearch").find("input:text").removeClass("required");
	}
	var entrustsum=0;
	if($("#completed_project_entrust").val()!='')
		entrustsum = parseInt($("#completed_project_entrust").val());
	if($("#current_research_project_entrust").val()!='')
		entrustsum = parseInt($("#current_research_project_entrust").val());
	if($("#completed_project_entrust").val()!=''&&$("#current_research_project_entrust").val()!='')
		entrustsum = parseInt($("#completed_project_entrust").val())+parseInt($("#current_research_project_entrust").val());
	if(entrustsum>0){
		$("#entrust_color").show();
	}else{
		$("#entrust_color").hide();
	}
	var optionalsum = 0;
	if($("#completed_project_optional").val()!='')
		optionalsum = parseInt($("#completed_project_optional").val());
	if($("#current_research_project_optional").val()!='')
		optionalsum = parseInt($("#current_research_project_optional").val());
	if($("#completed_project_optional").val()!=''&&$("#current_research_project_optional").val()!='')
		optionalsum = parseInt($("#completed_project_optional").val())+parseInt($("#current_research_project_optional").val());
	if(optionalsum>0){
		$("#optional_color").show();
	}else{
		$("#optional_color").hide();
	}
});
function completed(){
	var completedsum = 0;
	if($("#completed_project_country").val()=='')
		completedsum =parseInt($("#completed_project_province").val());
	if($("#completed_project_province").val()=='')
		completedsum= parseInt($("#completed_project_country").val());
	if($("#completed_project_country").val()==''&&$("#completed_project_province").val()=='')
		completedsum = 0;
	else if($("#completed_project_country").val()!=''&&$("#completed_project_province").val()!='')
	var completedsum = parseInt($("#completed_project_country").val())+parseInt($("#completed_project_province").val());
	$("#num").val(completedsum);
}
function current(){
	var currentsum = 0;
	if($("#current_research_project_country").val()=='')
		currentsum =parseInt($("#current_research_project_province").val());
	if($("#current_research_project_province").val()=='')
		currentsum = parseInt($("#current_research_project_country").val());
	if($("#current_research_project_province").val()==''&&$("#current_research_project_country").val()=='')
		currentsum = 0
		else if($("#current_research_project_province").val()!=''&&$("#current_research_project_country").val()!='')
			currentsum = parseInt($("#current_research_project_province").val())+parseInt($("#current_research_project_country").val());
	$("#number").val(currentsum);
}
function checkTabLimit1(tableId)
{
	
	var maxLinNum=$("#"+tableId+" tr").length-2;
	if($("#num").val()==''){
		scmWarn('项目承担情况中完成项目中的国家级和省部级为空，不能添加');
		return false;
	}else if($("#num").val()=='0'){
		scmWarn('项目承担情况中完成项目中的国家级和省部级为空，不能添加');
		return false;
	}else if(maxLinNum>=$("#num").val())
		{
			scmWarn('最多只能添加'+$("#num").val()+'条已完成项目信息');
			return false;
		}
	return true;
}
function checkTabLimit2(tableId)
{
	var maxLinNum=$("#"+tableId+" tr").length-2;
	if($("#number").val()==''){
		scmWarn('项目承担情况中在研项目中的国家级和省部级为空，不能添加');
		return false;
	}else if($("#number").val()=='0'){
		scmWarn('项目承担情况中在研项目中的国家级和省部级为空，不能添加');
		return false;
	}else if(maxLinNum>=$("#number").val())
		{
			scmWarn('最多只能添加'+$("#number").val()+'条在研项目信息');
			return false;
		} 
	return true;
}
function country(){
	if($("#num").val()>0){
		$("#color1").show();
		$("#completedproject").find("input:text").addClass("required");
	}else{
		$("#color1").hide();
		$("#completedproject").find("input:text").removeClass("required");
	}
}
function research(){
	if($("#number").val()>0){
		$("#color2").show();
		$("#currentresearch").find("input:text").addClass("required");
	}else{
		$("#color2").hide();
		$("#currentresearch").find("input:text").removeClass("required");
	}
}

function entrust(){
	var entrustsum=0;
	if($("#completed_project_entrust").val()!='')
		entrustsum = parseInt($("#completed_project_entrust").val());
	if($("#current_research_project_entrust").val()!='')
		entrustsum = parseInt($("#current_research_project_entrust").val());
	if($("#completed_project_entrust").val()!=''&&$("#current_research_project_entrust").val()!='')
		entrustsum = parseInt($("#completed_project_entrust").val())+parseInt($("#current_research_project_entrust").val());
	if(entrustsum>0){
		$("#entrust_color").show();
	}else{
		$("#entrust_color").hide();
	}
}
function optional(){
	var optionalsum = 0;
	if($("#completed_project_optional").val()!='')
		optionalsum = parseInt($("#completed_project_optional").val());
	if($("#current_research_project_optional").val()!='')
		optionalsum = parseInt($("#current_research_project_optional").val());
	if($("#completed_project_optional").val()!=''&&$("#current_research_project_optional").val()!='')
		optionalsum = parseInt($("#completed_project_optional").val())+parseInt($("#current_research_project_optional").val());
	if(optionalsum>0){
		$("#optional_color").show();
	}else{
		$("#optional_color").hide();
	}
}
</script>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInfo6"
	cellspacing="1">
  	<col style="width: 20%" />
  	<col style="width: 13.3%" />
  	<col style="width: 13.3%" />
  	<col style="width: 13.3%" />
  	<col style="width: 13.3%" />
  	<col style="width: 13.3%" />
  	<col style="width: 13.3%" />
  	<tr>
  		<td colspan="7" class="t_bar2"><span class="color_red">*</span>项目承担情况</td>
  	</tr>
  	<tr>
  		<td colspan="7" style="text-align: right;">单位：项</td>
  	</tr>
  	<tr>
  		<td></td>
  		<td align="center">总数</td>
  		<td align="center">国家级</td>
  		<td align="center">省部级</td>
  		<td align="center">市厅级</td>
  		<td align="center">横向委托</td>
  		<td align="center">自选</td>
  	</tr>
  	<tr>
  		<td align="right" >完成项目：</td>
  		<td>
  			<input type="text" id="completed_project_total" style="width: 90%;text-align: right;" name="proposal/completed_project_total" value="<x:out select="$xmlData/data/proposal/completed_project_total" />" class="gray" disabled="disabled" />
  		</td>
  		<td>
  			<input type="text" id="completed_project_country" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/completed_project_country" label="完成项目-->国家级" class="required"
  			onchange="countFundAutoOfPerson('','completed_project_country,completed_project_province,completed_project_city,completed_project_entrust,completed_project_optional','completed_project_total');completed();country()"
  			 value="<x:out select="$xmlData/data/proposal/completed_project_country" />" />
  		</td>
  		<td>
  			<input type="text" id="completed_project_province" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/completed_project_province" label="完成项目-->省部级" class="required"
  			onchange="countFundAutoOfPerson('','completed_project_country,completed_project_province,completed_project_city,completed_project_entrust,completed_project_optional','completed_project_total');completed();country()"
  			value="<x:out select="$xmlData/data/proposal/completed_project_province" />" />
  		</td>
  		<td>
  			<input type="text" id="completed_project_city" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/completed_project_city" label="完成项目-->市厅级" class="required"
  			onchange="countFundAutoOfPerson('','completed_project_country,completed_project_province,completed_project_city,completed_project_entrust,completed_project_optional','completed_project_total')" 
  			value="<x:out select="$xmlData/data/proposal/completed_project_city" />" />
  		</td>
  		<td>
  			<input type="text" id="completed_project_entrust" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/completed_project_entrust" label="完成项目-->横向委托"
  			onchange="countFundAutoOfPerson('','completed_project_country,completed_project_province,completed_project_city,completed_project_entrust,completed_project_optional','completed_project_total');entrust()" class="required" 
  			value="<x:out select="$xmlData/data/proposal/completed_project_entrust" />" />
  		</td>
  		<td>
  			<input type="text" id="completed_project_optional" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)" name="proposal/completed_project_optional" label="完成项目-->自选"
  			onchange="countFundAutoOfPerson('','completed_project_country,completed_project_province,completed_project_city,completed_project_entrust,completed_project_optional','completed_project_total');optional()" class="required" 
  			value="<x:out select="$xmlData/data/proposal/completed_project_optional" />" />
  		</td>
  	</tr>
  	<tr>
  		<td align="right" >在研项目：</td>
  		<td>
  			<input type="text" id="current_research_project_total" style="width: 90%;text-align: right;" name="proposal/current_research_project_total" value="<x:out select="$xmlData/data/proposal/current_research_project_total" />" class="gray" disabled="disabled" />
  		</td>
  		<td>
  			<input type="text" id="current_research_project_country" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/current_research_project_country" label="在研项目-->国家级" class="required"
  			onchange="countFundAutoOfPerson('','current_research_project_country,current_research_project_province,current_research_project_city,current_research_project_entrust,current_research_project_optional','current_research_project_total');current();research()"
  			 value="<x:out select="$xmlData/data/proposal/current_research_project_country" />" />
  		</td>
  		<td>
  			<input type="text" id="current_research_project_province" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/current_research_project_province" label="在研项目-->省部级" class="required"
  			onchange="countFundAutoOfPerson('','current_research_project_country,current_research_project_province,current_research_project_city,current_research_project_entrust,current_research_project_optional','current_research_project_total');current();research()"
  			value="<x:out select="$xmlData/data/proposal/current_research_project_province" />" />
  		</td>
  		<td>
  			<input type="text" id="current_research_project_city" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/current_research_project_city" label="在研项目-->市厅级" class="required"
  			onchange="countFundAutoOfPerson('','current_research_project_country,current_research_project_province,current_research_project_city,current_research_project_entrust,current_research_project_optional','current_research_project_total')" 
  			value="<x:out select="$xmlData/data/proposal/current_research_project_city" />" />
  		</td>
  		<td>
  			<input type="text" id="current_research_project_entrust" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)"  name="proposal/current_research_project_entrust" label="在研项目-->横向委托"
  			onchange="countFundAutoOfPerson('','current_research_project_country,current_research_project_province,current_research_project_city,current_research_project_entrust,current_research_project_optional','current_research_project_total');entrust()" class="required" 
  			value="<x:out select="$xmlData/data/proposal/current_research_project_entrust" />" />
  		</td>
  		<td>
  			<input type="text" id="current_research_project_optional" style="width: 90%;text-align: right;"  onfocus="InitInput.setNumber(this,7,0,0)" name="proposal/current_research_project_optional" label="在研项目-->自选"
  			onchange="countFundAutoOfPerson('','current_research_project_country,current_research_project_province,current_research_project_city,current_research_project_entrust,current_research_project_optional','current_research_project_total');optional()" class="required" 
  			value="<x:out select="$xmlData/data/proposal/current_research_project_optional" />" />
  		</td>
  	</tr>
	</table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注： “完成项目”为近五年已结题的项目，“在研项目”为上一年年底未结题的项目。
	<div class="t_bar2"
	style="height: 30px; margin-bottom: -10px; padding-top: 5px; text-align: left;"><span class = "color_red" id = "color1" style = "display: none;">*</span>已完成项目（最多允许添加条目数为：完成项目中国家级和省部级数量之和）</div>
	<table class="t_css  table01" width="100%" border="0" cellpadding="0" id="completedproject"
	cellspacing="1">
	<col style="width: 5%" />
	<col style="width: 5%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 10%" />
	<thead>
		<tr>
			<th>选择</th>
			<th>序号</th>
			<th>项目名称</th>
			<th>项目类型</th>
			<th>经费</th>
			<th>开始时间</th>
			<th>结束时间</th>
			<th>主持/参与人</th>
		</tr>
		</thead>
	<tbody id="tab">
		<tr style="display: none" align="center">
			<td align="center"><input type="radio" class="radiobutton" 
				name="selfund_completedproject"></td>
			<td align="center"><span name="completedprojects|completedproject[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input 
				name="completedprojects|completedproject[0]|entry_name" label="项目名称" value=""
				class=" input_text" style="width: 85%;" maxlength="100" /></td>
				<td align="center"><cpt:select id="item_type[index]" 
					name="item_type" key="item_type" 
					onChange="initControlValue(this.id);" style="width:70%"></cpt:select>
				<input type="hidden" name="completedprojects|completedproject[0]|item_type_value"
				class="required" label="项目类型" value="" /> <input type="hidden" 
				name="completedprojects|completedproject[0]|item_type_name" id="item_type_name"  value="" /></td>
				<td align="center"><input 
				name="completedprojects|completedproject[0]|funds" label="经费" value=""
				class=" input_text" style="width: 85%; text-align: right;" onfocus="InitInput.setNumber(this,7,2,2)"  /></td>
				<td align="center">
			       <input id="completedproject_start_date_[0]"
				name="completedprojects|completedproject[0]|start_date" label="开始日期" value=""
				class="  input_text date  dateCompare:completedproject_end_date_[0]"
				style="width: 70px"  />
			</td>
			<td align="center">
			<input id="completedproject_end_date_[0]"
				name="completedprojects|completedproject[0]|end_date" label="结束日期" value=""
				class="  input_text date"
				style="width: 70px"  />
			</td>
			<td align="center"><input 
				name="completedprojects|completedproject[0]|participant" label="主持/参与人" value=""
				class=" input_text" style="width: 85%;" maxlength="100" /></td>
		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/completedprojects/completedproject" var="completedproject">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td><input type="radio" class="radiobutton" 
					name="selfund_completedproject"></td>
				<td align="center"><span name="completedprojects/completedproject[${flag}${index}]@seq_no"><x:out select="$completedproject/@seq_no" /></span></td>
				<td><input id="entry_name_[${flag}${index}]"
					value="<x:out select="$completedproject/entry_name"/>"label="项目名称"
					name="completedprojects/completedproject[${flag}${index}]/entry_name"
					maxlength="100" class=" input_text" style="width: 85%" /></td>
					<td align="center"><c:set var="item_type_value">
						<x:out select="$completedproject/item_type_value" />
					</c:set> <cpt:select id="item_type${index}" value="${item_type_value }"
						key="item_type" name="item_type"
						onChange="initControlValue(this.id);"  style="width:70%"></cpt:select>
					<input type="hidden"
					name="completedprojects/completedproject[${flag}${index}]/item_type_value"
					class="required" label="项目类型"
					value="<x:out select="$completedproject/item_type_value" />" /> <input
					type="hidden" 
					name="completedprojects/completedproject[${flag}${index}]/item_type_name"
					value="<x:out select="$completedproject/item_type_name" />" /></td>
					<td><input id="funds_[${flag}${index}]"
					value="<x:out select="$completedproject/funds"/>"label="经费"
					name="completedprojects/completedproject[${flag}${index}]/funds"
					maxlength="20" class=" input_text" style="width: 85%;text-align: right;"
					onfocus="InitInput.setNumber(this,7,2,2)" /></td>
					<td align="center">
					<c:set var="start_date" scope="page">
						<x:out select="$completedproject/start_date" />
					</c:set> <input id="completedproject_start_date_[${flag}${index}]"
					value="${start_date}" label="开始日期"
					name="completedprojects/completedproject[${flag}${index}]/start_date"
					class=" date input_text  dateCompare:completedproject_end_date_[${flag}${index}]"
					style="width: 70px" />
				</td>
				<td align="center">
					<c:set var="end_date" scope="page">
						<x:out select="$completedproject/end_date" />
					</c:set> <input id="completedproject_end_date_[${flag}${index}]"
					name="completedprojects/completedproject[${flag}${index}]/end_date" label="结束日期"
					value="${end_date}"
					class=" date input_text"
					style="width: 70px" label="结束日期" />
				</td>
				<td><input id="participant_[${flag}${index}]"
					value="<x:out select="$completedproject/participant"/>"label="主持/参与人"
					name="completedprojects/completedproject[${flag}${index}]/participant"
					maxlength="100" class=" input_text" style="width: 85%" /></td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("completedproject");
		</script>
	</tbody>
	</table>
	<table width="100%" align="center">
	<tr>
		<td>
		
		<input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="if(checkTabLimit1('completedproject')){addNewRow('completedproject');showDateTag('completedproject');}try{top.resizeFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('completedproject','selfund_completedproject')"> 
			<input class="button" name="cmdMoveNext" type=button value="下移"onclick="moveNext('completedproject','selfund_completedproject')"> 
			<input class="button" name="cmddel" type=button value="删除" onclick="deleteSelectedRow('completedproject','已完成项目信息');"></td>
			<input type="hidden" id="num" name="completedproject/num" value="<x:out select="$xmlData/data/completedproject/num" />" />
	</tr>
</table>
	 <div class="t_bar2"
	style="height: 30px; margin-bottom: -10px; padding-top: 5px; text-align: left;"><span class = "color_red" id = "color2" style = "display: none;">*</span>在研项目（最多允许添加条目数为：在研项目中国家级和省部级数量之和）</div>
	<table class="t_css  table01" width="100%" border="0" cellpadding="0" id="currentresearch"
	cellspacing="1">
	<col style="width: 5%" />
	<col style="width: 5%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<col style="width: 10%" />
	<thead>
		<tr>
			<th>选择</th>
			<th>序号</th>
			<th>项目名称</th>
			<th>项目类型</th>
			<th>经费</th>
			<th>开始时间</th>
			<th>结束时间</th>
			<th>主持/参与人</th>
		</tr>
		</thead>
	<tbody id="tab">
		<tr style="display: none" align="center">
			<td align="center"><input type="radio" class="radiobutton"
				name="selfund_currentresearch"></td>
			<td align="center"><span name="currentresearchs|currentresearch[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input 
				name="currentresearchs|currentresearch[0]|entry_name" label="项目名称" value=""
				class=" input_text" style="width: 85%;" maxlength="100" /></td>
			<td align="center"><cpt:select id="itemtype[index]" 
					name="itemtype" key="itemtype"
					onChange="initControlValue(this.id);" style="width:70%"></cpt:select>
				<input type="hidden" name="currentresearchs|currentresearch[0]|itemtype_value"
				class="required" label="项目类型" value="" /> <input type="hidden"
				name="currentresearchs|currentresearch[0]|itemtype_name" value="" /></td>
				<td align="center"><input 
				name="currentresearchs|currentresearch[0]|funds" label="经费" value=""
				class=" input_text" style="width: 85%; text-align: right;" onfocus="InitInput.setNumber(this,7,2,2)"  /></td>
				<td align="center">
			       <input id="currentresearch_start_date_[0]"
				name="currentresearchs|currentresearch[0]|start_date" label="开始日期" value=""
				class="  input_text date  dateCompare:currentresearch_end_date_[0]"
				style="width: 70px"  />
			</td>
			<td align="center">
			<input id="currentresearch_end_date_[0]"
				name="currentresearchs|currentresearch[0]|end_date" label="结束日期" value=""
				class="  input_text date "
				style="width: 70px"  />
			</td>
			<td align="center"><input 
				name="currentresearchs|currentresearch[0]|participant" label="主持/参与人" value=""
				class=" input_text" style="width: 85%;" maxlength="100" /></td>
		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/currentresearchs/currentresearch" var="currentresearch">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td><input type="radio" class="radiobutton"
					name="selfund_currentresearch"></td>
				<td align="center"><span name="currentresearchs/currentresearch[${flag}${index}]@seq_no"><x:out select="$currentresearch/@seq_no" /></span></td>
				<td><input id="entry_name_[${flag}${index}]"
					value="<x:out select="$currentresearch/entry_name"/>"label="项目名称"
					name="currentresearchs/currentresearch[${flag}${index}]/entry_name"
					maxlength="100" class=" input_text" style="width: 85%" /></td>
					<td align="center"><c:set var="itemtype_value">
						<x:out select="$currentresearch/itemtype_value" />
					</c:set> <cpt:select id="itemtype${index}" value="${itemtype_value }"
						key="itemtype" name="itemtype"
						onChange="initControlValue(this.id);" style="width:70%"></cpt:select>
					<input type="hidden"
					name="currentresearchs/currentresearch[${flag}${index}]/itemtype_value"
					class="required" label="项目类型"
					value="<x:out select="$currentresearch/itemtype_value" />" /> <input
					type="hidden"
					name="currentresearchs/currentresearch[${flag}${index}]/itemtype_name"
					value="<x:out select="$currentresearch/itemtype_name" />" /></td>
					<td><input id="funds_[${flag}${index}]"
					value="<x:out select="$currentresearch/funds"/>"label="经费"
					name="currentresearchs/currentresearch[${flag}${index}]/funds"
					maxlength="20" class=" input_text" style="width: 85%;text-align: right;"
					onfocus="InitInput.setNumber(this,7,2,2)" /></td>
					<td align="center">
					<c:set var="start_date" scope="page">
						<x:out select="$currentresearch/start_date" />
					</c:set> <input id="currentresearch_start_date_[${flag}${index}]"
					value="${start_date}" label="开始日期"
					name="currentresearchs/currentresearch[${flag}${index}]/start_date"
					class=" date input_text dateCompare:currentresearch_end_date_[${flag}${index}] "
					style="width: 70px" />
				</td>
				<td align="center">
					<c:set var="end_date" scope="page">
						<x:out select="$currentresearch/end_date" />
					</c:set> <input id="currentresearch_end_date_[${flag}${index}]"
					name="currentresearchs/currentresearch[${flag}${index}]/end_date" label="结束日期"
					value="${end_date}"
					class=" date input_text "
					style="width: 70px" label="结束日期" />
				</td>
				<td><input id="participant_[${flag}${index}]"
					value="<x:out select="$currentresearch/participant"/>"label="主持/参与人"
					name="currentresearchs/currentresearch[${flag}${index}]/participant"
					maxlength="100" class=" input_text" style="width: 85%" /></td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("currentresearch");
		</script>
	</tbody>
	</table>
	<table width="100%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="if(checkTabLimit2('currentresearch')){addNewRow('currentresearch');showDateTag('currentresearch');}try{top.resizeFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('currentresearch','selfund_currentresearch')"> 
			<input class="button" name="cmdMoveNext" type=button value="下移"onclick="moveNext('currentresearch','selfund_currentresearch')"> 
			<input class="button" name="cmddel" type=button value="删除" onclick="deleteSelectedRow('currentresearch','在研项目信息');"></td>
			<input type="hidden" id="number" name="currentresearch/number" value="<x:out select="$xmlData/data/currentresearch/number" />" />
	</tr>
</table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：（1）项目类型：本表只填报省部级及以上项目，包括国家级和省部级两大类。国家级计划主要指“863”计划、“973”计划、国家支撑计划、国家重大专项、国家自然科学基金等。省部级计划包括各部委、省级下达的各项计划，包括国际合作项目。<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;（2）“主持人/参与人”应为平台内人员，仅填写1名人员。与其他单位合作承担项目填写排位前三的平台人员姓名，并备注排位情况。
 <div class="t_bar2"
	style="height: 30px; margin-bottom: -10px; padding-top: 5px; text-align: left;"><span class = "color_red" style="display: none" id="entrust_color">*</span>承担的横向委托项目信息表（限10条）</div>
	<table class="t_css  table01" width="100%" border="0" cellpadding="0" id="entrust"
	cellspacing="1">
	<col style="width: 5%" />
	<col style="width: 5%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<col style="width: 15%" />
	<col style="width: 15%" />
	<thead>
		<tr>
			<th>选择</th>
			<th>序号</th>
			<th>项目名称</th>
			<th>委托单位</th>
			<th>负责人</th>
			<th>开始时间</th>
			<th>结束时间</th>
		</tr>
		</thead>
	<tbody id="tab">
		<tr style="display: none" align="center">
			<td align="center"><input type="radio" class="radiobutton"
				name="selfund_entrust"></td>
			<td align="center"><span name="entrusts|entrust[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input 
				name="entrusts|entrust[0]|entry_name" label="项目名称" value=""
				class="required input_text" style="width: 85%;" maxlength="100" /></td>
				<td align="center"><input 
				name="entrusts|entrust[0]|commission_unit" label="委托单位" value=""
				class="required input_text" style="width: 85%;" maxlength="100" /></td>
				<td align="center"><input 
				name="entrusts|entrust[0]|person_charge" label="负责人" value="" maxlength="100"
				class="required input_text" style="width: 85%;"  /></td>
				<td align="center">
			       <input id="entrust_start_date_[0]"
				name="entrusts|entrust[0]|start_date" label="开始日期" value=""
				class="required  input_text date  dateCompare:entrust_end_date_[0] "
				style="width: 70px"  />
			</td>
			<td align="center">
			<input id="entrust_end_date_[0]"
				name="entrusts|entrust[0]|end_date" label="结束日期" value=""
				class=" required input_text  "
				style="width: 70px"  />
			</td>
		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/entrusts/entrust" var="entrust">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td><input type="radio" class="radiobutton"
					name="selfund_entrust"></td>
				<td align="center"><span name="entrusts/entrust[${flag}${index}]@seq_no"><x:out select="$entrust/@seq_no" /></span></td>
				<td><input id="entry_name_[${flag}${index}]"
					value="<x:out select="$entrust/entry_name"/>"label="项目名称"
					name="entrusts/entrust[${flag}${index}]/entry_name"
					maxlength="100" class="required input_text" style="width: 85%" /></td>
					<td align="center">
					<input id="commission_unit_[${flag}${index}]"
					value="<x:out select="$entrust/commission_unit"/>"label="委托单位"
					name="entrusts/entrust[${flag}${index}]/commission_unit"
					maxlength="100" class="required input_text" style="width: 85%" /></td>
					<td><input id="funds_[${flag}${index}]"
					value="<x:out select="$entrust/person_charge"/>"label="负责人"
					name="entrusts/entrust[${flag}${index}]/person_charge"
					maxlength="100" class="required input_text" style="width: 85%;"
					/></td>
					<td align="center">
					<c:set var="start_date" scope="page">
						<x:out select="$entrust/start_date" />
					</c:set> <input id="entrust_start_date_[${flag}${index}]"
					value="${start_date}" label="开始日期"
					name="entrusts/entrust[${flag}${index}]/start_date"
					class="required date input_text dateCompare:entrust_end_date_[${flag}${index}] "
					style="width: 70px" />
				</td>
				<td align="center">
					<c:set var="end_date" scope="page">
						<x:out select="$entrust/end_date" />
					</c:set> <input id="entrust_end_date_[${flag}${index}]"
					name="entrusts/entrust[${flag}${index}]/end_date" label="结束日期"
					value="${end_date}"
					class="required date input_text"
					style="width: 70px" label="结束日期" />
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("entrust");
		</script>
	</tbody>
	</table>
	<table width="100%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="if(checkTabLimit('entrust',10,'最多只能添加10条承担的横向委托项目信息')){addNewRow('entrust');showDateTag('entrust');}try{top.resizeFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('entrust','selfund_entrust')"> 
			<input class="button" name="cmdMoveNext" type=button value="下移"onclick="moveNext('entrust','selfund_entrust')"> 
			<input class="button" name="cmddel" type=button value="删除" onclick="deleteSelectedRow('entrust','承担的横向委托项目信息');"></td>
			<input type="hidden" id="number" value="0" />
	</tr>
</table>
<div class="t_bar2"
	style="height: 30px; margin-bottom: -10px; padding-top: 5px; text-align: left;"><span class = "color_red" id="optional_color" style="display: none">*</span>自选项目信息表（限5条）</div>
	<table class="t_css  table01" width="100%" border="0" cellpadding="0" id="optional"
	cellspacing="1">
	<col style="width: 5%" />
	<col style="width: 5%" />
	<col style="width: 25%" />
	<col style="width: 25%" />
	<col style="width: 20%" />
	<col style="width: 20%" />
	<thead>
		<tr>
			<th>选择</th>
			<th>序号</th>
			<th>项目名称</th>
			<th>负责人</th>
			<th>开始时间</th>
			<th>结束时间</th>
		</tr>
		</thead>
	<tbody id="tab">
		<tr style="display: none" align="center">
			<td align="center"><input type="radio" class="radiobutton"
				name="selfund_optional"></td>
			<td align="center"><span name="optionals|optional[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input 
				name="optionals|optional[0]|entry_name" label="项目名称" value=""
				class="required input_text" style="width: 85%;" maxlength="100" /></td>
				<td align="center"><input 
				name="optionals|optional[0]|person_charge" label="负责人" value="" maxlength="100"
				class="required input_text" style="width: 85%;"  /></td>
				<td align="center">
			       <input id="optional_start_date_[0]"
				name="optionals|optional[0]|start_date" label="开始日期" value=""
				class="required  input_text date  dateCompare:optional_end_date_[0] "
				style="width: 70px"  />
			</td>
			<td align="center">
			<input id="optional_end_date_[0]"
				name="optionals|optional[0]|end_date" label="结束日期" value=""
				class="required  input_text date  "
				style="width: 70px"  />
			</td>
		</tr>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/optionals/optional" var="optional">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr align="center">
				<td><input type="radio" class="radiobutton"
					name="selfund_optional"></td>
				<td align="center"><span name="optionals/optional[${flag}${index}]@seq_no"><x:out select="$optional/@seq_no" /></span></td>
				<td><input id="entry_name_[${flag}${index}]"
					value="<x:out select="$optional/entry_name"/>"label="项目名称"
					name="optionals/optional[${flag}${index}]/entry_name"
					maxlength="100" class="required input_text" style="width: 85%" /></td>
					<td><input id="funds_[${flag}${index}]"
					value="<x:out select="$optional/person_charge"/>"label="负责人"
					name="optionals/optional[${flag}${index}]/person_charge"
					maxlength="100" class="required input_text" style="width: 85%;"/>
					</td>
					<td align="center">
					<c:set var="start_date" scope="page">
						<x:out select="$optional/start_date" />
					</c:set> <input id="optional_start_date_[${flag}${index}]"
					value="${start_date}" label="开始日期"
					name="optionals/optional[${flag}${index}]/start_date"
					class="required date input_text dateCompare:optional_end_date_[${flag}${index}] "
					style="width: 70px" />
				</td>
				<td align="center">
					<c:set var="end_date" scope="page">
						<x:out select="$optional/end_date" />
					</c:set> <input id="optional_end_date_[${flag}${index}]"
					name="optionals/optional[${flag}${index}]/end_date" label="结束日期"
					value="${end_date}"
					class="required date input_text "
					style="width: 70px" label="结束日期" />
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("optional");
		</script>
	</tbody>
	</table>
	<table width="100%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="if(checkTabLimit('optional',5,'最多只能添加5条自选项目信息')){addNewRow('optional');showDateTag('optional');}try{top.resizeFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('optional','selfund_optional')"> 
			<input class="button" name="cmdMoveNext" type=button value="下移"onclick="moveNext('optional','selfund_optional')"> 
			<input class="button" name="cmddel" type=button value="删除" onclick="deleteSelectedRow('optional','自选项目信息');"></td>
			<input type="hidden" id="number" value="0" />
	</tr>
</table>